package com.itdfq.test;

/**
 * @Author: QianMo
 * @Date: 2021/12/2 9:47
 * @Description:
 */
public class Maopao {
    public static void main(String[] args) {
        int score[] = new int[]{5,4,3,2,1};
        int str;
        for (int i = 0; i < score.length-1; i++) {
            for (int j = i + 1; j < score.length; j++) {
                str = score[i];
                if (score[i] > score[j]) {
                    score[i] = score[j];
                    score[j] = str;
                }
            }
        }
        for (int i=0;i<score.length;i++){
            System.out.println(score[i]);
        }
    }
}
